/**
 * Copyright (c) 2000-2012 Liferay, Inc. All rights reserved.
 *
 * This library is free software; you can redistribute it and/or modify it under
 * the terms of the GNU Lesser General Public License as published by the Free
 * Software Foundation; either version 2.1 of the License, or (at your option)
 * any later version.
 *
 * This library is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
 * details.
 */

package postlogin.service.persistence;

import com.liferay.portal.kernel.bean.PortletBeanLocatorUtil;
import com.liferay.portal.kernel.dao.orm.DynamicQuery;
import com.liferay.portal.kernel.exception.SystemException;
import com.liferay.portal.kernel.util.OrderByComparator;
import com.liferay.portal.kernel.util.ReferenceRegistry;
import com.liferay.portal.service.ServiceContext;

import postlogin.model.UsuarioSlicRol;

import java.util.List;

/**
 * The persistence utility for the usuario slic rol service. This utility wraps {@link UsuarioSlicRolPersistenceImpl} and provides direct access to the database for CRUD operations. This utility should only be used by the service layer, as it must operate within a transaction. Never access this utility in a JSP, controller, model, or other front-end class.
 *
 * <p>
 * Caching information and settings can be found in <code>portal.properties</code>
 * </p>
 *
 * @author tito
 * @see UsuarioSlicRolPersistence
 * @see UsuarioSlicRolPersistenceImpl
 * @generated
 */
public class UsuarioSlicRolUtil {
	/*
	 * NOTE FOR DEVELOPERS:
	 *
	 * Never modify this class directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this class.
	 */

	/**
	 * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
	 */
	public static void clearCache() {
		getPersistence().clearCache();
	}

	/**
	 * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel)
	 */
	public static void clearCache(UsuarioSlicRol usuarioSlicRol) {
		getPersistence().clearCache(usuarioSlicRol);
	}

	/**
	 * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
	 */
	public long countWithDynamicQuery(DynamicQuery dynamicQuery)
		throws SystemException {
		return getPersistence().countWithDynamicQuery(dynamicQuery);
	}

	/**
	 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
	 */
	public static List<UsuarioSlicRol> findWithDynamicQuery(
		DynamicQuery dynamicQuery) throws SystemException {
		return getPersistence().findWithDynamicQuery(dynamicQuery);
	}

	/**
	 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
	 */
	public static List<UsuarioSlicRol> findWithDynamicQuery(
		DynamicQuery dynamicQuery, int start, int end)
		throws SystemException {
		return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
	}

	/**
	 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator)
	 */
	public static List<UsuarioSlicRol> findWithDynamicQuery(
		DynamicQuery dynamicQuery, int start, int end,
		OrderByComparator orderByComparator) throws SystemException {
		return getPersistence()
				   .findWithDynamicQuery(dynamicQuery, start, end,
			orderByComparator);
	}

	/**
	 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
	 */
	public static UsuarioSlicRol update(UsuarioSlicRol usuarioSlicRol,
		boolean merge) throws SystemException {
		return getPersistence().update(usuarioSlicRol, merge);
	}

	/**
	 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean, ServiceContext)
	 */
	public static UsuarioSlicRol update(UsuarioSlicRol usuarioSlicRol,
		boolean merge, ServiceContext serviceContext) throws SystemException {
		return getPersistence().update(usuarioSlicRol, merge, serviceContext);
	}

	/**
	* Caches the usuario slic rol in the entity cache if it is enabled.
	*
	* @param usuarioSlicRol the usuario slic rol
	*/
	public static void cacheResult(
		postlogin.model.UsuarioSlicRol usuarioSlicRol) {
		getPersistence().cacheResult(usuarioSlicRol);
	}

	/**
	* Caches the usuario slic rols in the entity cache if it is enabled.
	*
	* @param usuarioSlicRols the usuario slic rols
	*/
	public static void cacheResult(
		java.util.List<postlogin.model.UsuarioSlicRol> usuarioSlicRols) {
		getPersistence().cacheResult(usuarioSlicRols);
	}

	/**
	* Creates a new usuario slic rol with the primary key. Does not add the usuario slic rol to the database.
	*
	* @param usuarioSlicRolId the primary key for the new usuario slic rol
	* @return the new usuario slic rol
	*/
	public static postlogin.model.UsuarioSlicRol create(long usuarioSlicRolId) {
		return getPersistence().create(usuarioSlicRolId);
	}

	/**
	* Removes the usuario slic rol with the primary key from the database. Also notifies the appropriate model listeners.
	*
	* @param usuarioSlicRolId the primary key of the usuario slic rol
	* @return the usuario slic rol that was removed
	* @throws postlogin.NoSuchUsuarioSlicRolException if a usuario slic rol with the primary key could not be found
	* @throws SystemException if a system exception occurred
	*/
	public static postlogin.model.UsuarioSlicRol remove(long usuarioSlicRolId)
		throws com.liferay.portal.kernel.exception.SystemException,
			postlogin.NoSuchUsuarioSlicRolException {
		return getPersistence().remove(usuarioSlicRolId);
	}

	public static postlogin.model.UsuarioSlicRol updateImpl(
		postlogin.model.UsuarioSlicRol usuarioSlicRol, boolean merge)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().updateImpl(usuarioSlicRol, merge);
	}

	/**
	* Returns the usuario slic rol with the primary key or throws a {@link postlogin.NoSuchUsuarioSlicRolException} if it could not be found.
	*
	* @param usuarioSlicRolId the primary key of the usuario slic rol
	* @return the usuario slic rol
	* @throws postlogin.NoSuchUsuarioSlicRolException if a usuario slic rol with the primary key could not be found
	* @throws SystemException if a system exception occurred
	*/
	public static postlogin.model.UsuarioSlicRol findByPrimaryKey(
		long usuarioSlicRolId)
		throws com.liferay.portal.kernel.exception.SystemException,
			postlogin.NoSuchUsuarioSlicRolException {
		return getPersistence().findByPrimaryKey(usuarioSlicRolId);
	}

	/**
	* Returns the usuario slic rol with the primary key or returns <code>null</code> if it could not be found.
	*
	* @param usuarioSlicRolId the primary key of the usuario slic rol
	* @return the usuario slic rol, or <code>null</code> if a usuario slic rol with the primary key could not be found
	* @throws SystemException if a system exception occurred
	*/
	public static postlogin.model.UsuarioSlicRol fetchByPrimaryKey(
		long usuarioSlicRolId)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().fetchByPrimaryKey(usuarioSlicRolId);
	}

	/**
	* Returns all the usuario slic rols where usuario = &#63;.
	*
	* @param usuario the usuario
	* @return the matching usuario slic rols
	* @throws SystemException if a system exception occurred
	*/
	public static java.util.List<postlogin.model.UsuarioSlicRol> findByUsuario(
		java.lang.String usuario)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().findByUsuario(usuario);
	}

	/**
	* Returns a range of all the usuario slic rols where usuario = &#63;.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
	* </p>
	*
	* @param usuario the usuario
	* @param start the lower bound of the range of usuario slic rols
	* @param end the upper bound of the range of usuario slic rols (not inclusive)
	* @return the range of matching usuario slic rols
	* @throws SystemException if a system exception occurred
	*/
	public static java.util.List<postlogin.model.UsuarioSlicRol> findByUsuario(
		java.lang.String usuario, int start, int end)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().findByUsuario(usuario, start, end);
	}

	/**
	* Returns an ordered range of all the usuario slic rols where usuario = &#63;.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
	* </p>
	*
	* @param usuario the usuario
	* @param start the lower bound of the range of usuario slic rols
	* @param end the upper bound of the range of usuario slic rols (not inclusive)
	* @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
	* @return the ordered range of matching usuario slic rols
	* @throws SystemException if a system exception occurred
	*/
	public static java.util.List<postlogin.model.UsuarioSlicRol> findByUsuario(
		java.lang.String usuario, int start, int end,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence()
				   .findByUsuario(usuario, start, end, orderByComparator);
	}

	/**
	* Returns the first usuario slic rol in the ordered set where usuario = &#63;.
	*
	* @param usuario the usuario
	* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
	* @return the first matching usuario slic rol
	* @throws postlogin.NoSuchUsuarioSlicRolException if a matching usuario slic rol could not be found
	* @throws SystemException if a system exception occurred
	*/
	public static postlogin.model.UsuarioSlicRol findByUsuario_First(
		java.lang.String usuario,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.liferay.portal.kernel.exception.SystemException,
			postlogin.NoSuchUsuarioSlicRolException {
		return getPersistence().findByUsuario_First(usuario, orderByComparator);
	}

	/**
	* Returns the first usuario slic rol in the ordered set where usuario = &#63;.
	*
	* @param usuario the usuario
	* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
	* @return the first matching usuario slic rol, or <code>null</code> if a matching usuario slic rol could not be found
	* @throws SystemException if a system exception occurred
	*/
	public static postlogin.model.UsuarioSlicRol fetchByUsuario_First(
		java.lang.String usuario,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().fetchByUsuario_First(usuario, orderByComparator);
	}

	/**
	* Returns the last usuario slic rol in the ordered set where usuario = &#63;.
	*
	* @param usuario the usuario
	* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
	* @return the last matching usuario slic rol
	* @throws postlogin.NoSuchUsuarioSlicRolException if a matching usuario slic rol could not be found
	* @throws SystemException if a system exception occurred
	*/
	public static postlogin.model.UsuarioSlicRol findByUsuario_Last(
		java.lang.String usuario,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.liferay.portal.kernel.exception.SystemException,
			postlogin.NoSuchUsuarioSlicRolException {
		return getPersistence().findByUsuario_Last(usuario, orderByComparator);
	}

	/**
	* Returns the last usuario slic rol in the ordered set where usuario = &#63;.
	*
	* @param usuario the usuario
	* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
	* @return the last matching usuario slic rol, or <code>null</code> if a matching usuario slic rol could not be found
	* @throws SystemException if a system exception occurred
	*/
	public static postlogin.model.UsuarioSlicRol fetchByUsuario_Last(
		java.lang.String usuario,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().fetchByUsuario_Last(usuario, orderByComparator);
	}

	/**
	* Returns the usuario slic rols before and after the current usuario slic rol in the ordered set where usuario = &#63;.
	*
	* @param usuarioSlicRolId the primary key of the current usuario slic rol
	* @param usuario the usuario
	* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
	* @return the previous, current, and next usuario slic rol
	* @throws postlogin.NoSuchUsuarioSlicRolException if a usuario slic rol with the primary key could not be found
	* @throws SystemException if a system exception occurred
	*/
	public static postlogin.model.UsuarioSlicRol[] findByUsuario_PrevAndNext(
		long usuarioSlicRolId, java.lang.String usuario,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.liferay.portal.kernel.exception.SystemException,
			postlogin.NoSuchUsuarioSlicRolException {
		return getPersistence()
				   .findByUsuario_PrevAndNext(usuarioSlicRolId, usuario,
			orderByComparator);
	}

	/**
	* Returns all the usuario slic rols.
	*
	* @return the usuario slic rols
	* @throws SystemException if a system exception occurred
	*/
	public static java.util.List<postlogin.model.UsuarioSlicRol> findAll()
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().findAll();
	}

	/**
	* Returns a range of all the usuario slic rols.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
	* </p>
	*
	* @param start the lower bound of the range of usuario slic rols
	* @param end the upper bound of the range of usuario slic rols (not inclusive)
	* @return the range of usuario slic rols
	* @throws SystemException if a system exception occurred
	*/
	public static java.util.List<postlogin.model.UsuarioSlicRol> findAll(
		int start, int end)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().findAll(start, end);
	}

	/**
	* Returns an ordered range of all the usuario slic rols.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
	* </p>
	*
	* @param start the lower bound of the range of usuario slic rols
	* @param end the upper bound of the range of usuario slic rols (not inclusive)
	* @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
	* @return the ordered range of usuario slic rols
	* @throws SystemException if a system exception occurred
	*/
	public static java.util.List<postlogin.model.UsuarioSlicRol> findAll(
		int start, int end,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().findAll(start, end, orderByComparator);
	}

	/**
	* Removes all the usuario slic rols where usuario = &#63; from the database.
	*
	* @param usuario the usuario
	* @throws SystemException if a system exception occurred
	*/
	public static void removeByUsuario(java.lang.String usuario)
		throws com.liferay.portal.kernel.exception.SystemException {
		getPersistence().removeByUsuario(usuario);
	}

	/**
	* Removes all the usuario slic rols from the database.
	*
	* @throws SystemException if a system exception occurred
	*/
	public static void removeAll()
		throws com.liferay.portal.kernel.exception.SystemException {
		getPersistence().removeAll();
	}

	/**
	* Returns the number of usuario slic rols where usuario = &#63;.
	*
	* @param usuario the usuario
	* @return the number of matching usuario slic rols
	* @throws SystemException if a system exception occurred
	*/
	public static int countByUsuario(java.lang.String usuario)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().countByUsuario(usuario);
	}

	/**
	* Returns the number of usuario slic rols.
	*
	* @return the number of usuario slic rols
	* @throws SystemException if a system exception occurred
	*/
	public static int countAll()
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().countAll();
	}

	public static UsuarioSlicRolPersistence getPersistence() {
		if (_persistence == null) {
			_persistence = (UsuarioSlicRolPersistence)PortletBeanLocatorUtil.locate(postlogin.service.ClpSerializer.getServletContextName(),
					UsuarioSlicRolPersistence.class.getName());

			ReferenceRegistry.registerReference(UsuarioSlicRolUtil.class,
				"_persistence");
		}

		return _persistence;
	}

	/**
	 * @deprecated
	 */
	public void setPersistence(UsuarioSlicRolPersistence persistence) {
	}

	private static UsuarioSlicRolPersistence _persistence;
}